package dfbz.homework4;

public class Myrun implements Runnable {
    private int num;

    public Myrun(int num) {
        this.num = num;
    }

    public int getNum() {
        return num;
    }

    public void setNum(int num) {
        this.num = num;
    }

    @Override
    public void run() {
        int sum=1;
        for (int i = 1; i <=num; i++) {
            sum*=i;
        }
        System.out.println(num + "! = " + sum);
    }
}
